package com.tbvtc.agriculturalcreditchainserver2025.dto.CouponDto;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券主表
 * </p>
 *
 * @author syh
 * @since 2025-07-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("coupon")
public class OrdinaryCouponDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "优惠券名称")
    private String name;


    /**
     * 0-上架, 1-下架, 2-过期
     */
    @Schema(description = "0-上架, 1-下架, 2-过期")
    private Integer status;

    /**
     * 0-固定金额, 1-百分比
     */
    @Schema(description = "折扣类型")
    private Integer discountType;
    @Schema(description = "折扣值")
    private BigDecimal discountValue;

    @Schema(description = "最小订单金额")
    private BigDecimal minOrderAmount;

    /**
     * 普通券购买价格
     */
    @Schema(description = "普通券购买价格")
    private BigDecimal price;
    @Schema(description = "开始日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime validStart;
    @Schema(description = "结束日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime validEnd;


}
